import 'package:flutter_eve_plugin/model/ye_xiu/login/bind_result.dart';

class LoginState {
  String areaCode;
  String phone;
  String code;
  bool isReg;

  String nickName;
  int birthday;
  int sex;

  String wifiName;
  String wifiPass;

  BindResultModel bindResultModel;

  LoginState(
      {this.areaCode,
      this.phone,
      this.code,
      this.isReg,
      this.nickName,
      this.birthday,
      this.sex,
      this.wifiName,
      this.wifiPass,
      this.bindResultModel});

  LoginState copyWith(
      {areaCode,
      phone,
      code,
      isReg,
      nickName,
      birthday,
      sex,
      wifiName,
      wifiPass,
      bindResultModel}) {
    return LoginState(
        areaCode: areaCode ?? this.areaCode,
        phone: phone ?? this.phone,
        code: code ?? this.code,
        isReg: isReg ?? this.isReg,
        nickName: nickName ?? this.nickName,
        birthday: birthday ?? this.birthday,
        sex: sex ?? this.sex,
        wifiName: wifiName ?? this.wifiName,
        wifiPass: wifiPass ?? this.wifiPass,
        bindResultModel: bindResultModel ?? this.bindResultModel);
  }

  static LoginState initialState() {
    return LoginState(
        areaCode: '86',
        phone: '',
        code: '',
        isReg: false,
        nickName: '',
        birthday: 0,
        sex: 2,
        wifiName: '',
        wifiPass: '',
        bindResultModel: null);
  }
}
